#ifndef __CHECK_H
#define __CHECK_H


#define ERR_ROM		0xE1
#define ERR_RAM		0xE2
#define	ERR_DEE		0xE3
#define ERR_TMR0	0xE4
#define ERR_TMR1	0xE5
#define ERR_TMR2	0xE6
#define ERR_PWM		0xE7
#define ERR_WDT		0xE8

sbit PWM0 = P1^0;
sbit PWM1 = P1^1;
sbit PWM2 = P2^0;
sbit PWM3 = P2^1;
sbit LED0 = P0^0;

extern data uint8_t LedCnt;
extern data uint8_t ChkCnt0;
extern data uint16_t ChkCnt1;
extern data uint8_t LedTm;
extern bit ChkTmr0Res;
extern bit ChkTmr1Res;
extern bit ChkTmr2Res;

void CheckInit(void);
void CheckHandle(void);
void CheckTmr(void);
void CheckRam(void);
void CheckRom(void);
void CheckPee(void);
void CheckDee(void);
void CheckPwm(void);
void CheckWdt(void);
void CheckErr(uint8_t err_code);

#endif	//__CHECK_H
